import Vue from 'vue'
import Router from 'vue-router'
import Shop from '../components/Shop/Shop'
import ShopLogin from '../components/Shop/ShopLogin'
import ShopRegister from '../components/Shop/ShopRegister'
import GoodsDetail from '../components/Shop/GoodsDetail'
import Cart from '../components/shop_cart/Cart'
import CateGoods from '../components/Shop/CateGoods'
import ShopOrder from '../components/shop_order/ShopOrder'

Vue.use(Router)

const routes = [
  {
    path: '/',
    redirect: '/shop'
  },
  {
    path: '/shop',
    component: Shop
  },
  {
    path: '/shop_login',
    component: ShopLogin
  },
  {
    path: '/shop_register',
    component: ShopRegister
  },
  {
    path: '/goods_detail',
    component: GoodsDetail
  },
  {
    path: '/cart',
    component: Cart
  },
  {
    path: '/cate_goods',
    component: CateGoods
  },
  {
    path: '/shop_order',
    component: ShopOrder
  }
]
const router = new Router({
  routes,
  mode: 'history'
})

export default router
